package com.ccys.app.controller;

import com.ccys.app.service.SplashscreenService;
import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.vo.app.splashscreen.GetIntroPagesMakeVo;
import com.ccys.db.vo.app.splashscreen.GetMasterDataVo;
import com.ccys.db.vo.app.splashscreen.GetMedicationVo;
import com.ccys.db.vo.app.splashscreen.GetProfileVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @program: WhiteCoat
 * @description: 进入屏幕时的接口
 * @author: ZhangJingCan
 * @create: 2024-01-15 11:48
 **/
@RestController
@Api(tags = "进入屏幕时")
@RequestMapping("splashscreen")
public class SplashscreenController {

    @Autowired
    private SplashscreenService splashscreenService;

    @ApiOperation("获取主数据")
    @GetMapping(value = "/GetMasterData")
    public ResponseResultApp<GetMasterDataVo> getMasterData(HttpServletRequest request) {
        return splashscreenService.getMasterData(request);
    }

    @ApiOperation("获取药物集合(这个接口查询了所有药)")
    @GetMapping(value = "/GetMedication")
    public ResponseResultApp<List<GetMedicationVo>> getMedication() {
        return splashscreenService.getMedication();
    }

    @ApiOperation("GetProfile")
    @GetMapping(value = "/GetProfile")
    public ResponseResultApp<GetProfileVo> getProfile() {
        return splashscreenService.getProfile();
    }

    @ApiOperation("获取介绍页面")
    @GetMapping(value = "/GetIntroPages")
    public ResponseResultApp<List<GetIntroPagesMakeVo>> GetIntroPages() {
        return splashscreenService.GetIntroPages();
    }





}
